package mapper;

import model.SysMenus;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysMenusMapper {
    @Select("select * from sys_menus m join sys_roles_menus srm on m.id = srm.menu_id\n" +
            "join sys_roles sr on srm.role_id = sr.id join sys_users_roles sur on sr.id = sur.role_id\n" +
            "join sys_users su on sur.user_id = su.id\n" +
            "where su.id = #{id}")
    List<SysMenus> findAll(Long userId);
}
